/**
 * Created by cj on 2017/5/2.
 */

var myRevealingModule= function () {
    var privateCounter = 0;
    function privateFunction() { privateCounter++; }
    function publicFunction() { publicIncrement(); }
    function publicIncrement() { privateFunction(); }
    function publicGetCount() { return privateCounter; }
    //将私有的方法和属性暴露给公共的指针，返回一个匿名对象
    return {
        start:publicFunction,
        increment:publicIncrement,
        count:publicGetCount
    }
}();
